<?php
$mysql = new mysqli("localhost","root","root","zol3c");
if($mysql->connect_errno != 0){
    die();
}
$cx = $_GET["id"];
$res = $mysql->query("select * from ${cx}");
for($i = 0; $i < $res->num_rows; $i++){
    $data[] = $res->fetch_assoc();
}
print_r(json_encode($data));




?>